package com.sleep.ruledemo.node;

import com.sleep.ruledemo.constant.ConditionConstant;
import com.sleep.ruledemo.constant.NodeConstant;
import com.sleep.ruledemo.context.TestContent;
import com.yomahub.liteflow.core.NodeBooleanComponent;
import lombok.extern.slf4j.Slf4j;
import lombok.extern.slf4j.XSlf4j;
import org.springframework.stereotype.Component;

/**
 * @ClassName TestBooleanNode01
 * @Description TODO
 * @Author 郭敖
 * @Date 2024年05月06日 22:53
 * @Version 1.0
 */
@Component(NodeConstant.TJBP_NODE_01)
@Slf4j
public class TestBooleanNode01 extends NodeBooleanComponent {
    @Override
    public boolean processBoolean() throws Exception {
        TestContent content = this.getContextBean(TestContent.class);
        String name = content.getData("name", String.class);
        log.warn("booleanNode01 starting ...");
        return ConditionConstant.Name_Condition_Alice.equals(name);
    }
}
